<nav class="sidenav">
  <ul class="sidenav-tabs">
    <li class="sidenav-tab disabled"><span class="sidenav-tab-title"><span class="mh-icon mh-icon-menu"></span>&nbsp;学科资源</span></li>
    {% assign navSizeRange = site.sidebarNavs | size | minus: 1 %}
    {% for i in (0..navSizeRange) %}
    {% assign nav = site.sidebarNavs[i] %}
    <li class="sidenav-tab" data-target="#sidenav-target-{{i}}">
      <span class="sidenav-tab-title"><span class="mh-icon {{nav.iconClass}}"></span>&nbsp;{{nav.label}}</span>
      <ul class="sidenav-tab-links">
        {% for item in nav.titleLinks %}
        <li><a href="{{site.url | append: item.link}}" target="_self">{{item.label}}</a></li>
        {% endfor %}
      </ul>
    </li>
    {% endfor %}
  </ul>
  <ul class="sidenav-tab-contents">
    {% for i in (0..navSizeRange) %}
    {% assign nav = site.sidebarNavs[i] %}
    <li class="sidenav-tab-content clearfix" id="sidenav-target-{{i}}">
      {% for sub in nav.children %}
      <div class="sidenav-subemnu col-md-3">
        <h4 class="sidenav-submenu-title text-primary">{{sub.title}}</h4>
        <ul class="sidenav-submenu-items">
          {% for item in sub.children %}
          <li><a href="{{site.url | append: item.link}}">{{item.label}}</a></li>
          {% endfor %}
        </ul>
      </div>
      {% endfor %}
    </li>
    {% endfor %}
  </ul>
</nav>